.class public Lcom/example/m6wmr/ExchangeHistoryActivity;
.super Landroid/app/Activity;
.source "ExchangeHistoryActivity.java"

# interfaces
.implements Lcom/wmr/Lstview/XListView$IXListViewListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/example/m6wmr/ExchangeHistoryActivity$MyAdapter;,
        Lcom/example/m6wmr/ExchangeHistoryActivity$MyHolder;,
        Lcom/example/m6wmr/ExchangeHistoryActivity$mOnclistener;
    }
.end annotation


# instance fields
.field private activities:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Landroid/app/Activity;",
            ">;"
        }
    .end annotation
.end field

.field private adapter:Lcom/example/m6wmr/ExchangeHistoryActivity$MyAdapter;

.field private beans:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lbean/IntegralHistroyBean;",
            ">;"
        }
    .end annotation
.end field

.field private closebtn:Landroid/widget/LinearLayout;

.field private contentValues:Landroid/content/ContentValues;

.field private context:Landroid/content/Context;

.field private contextView:Landroid/view/View;

.field private cursor:Landroid/database/Cursor;

.field private db:Landroid/database/sqlite/SQLiteDatabase;

.field private getJsonString:Ljava/lang/String;

.field private h:Landroid/os/Handler;

.field private is_loading:Z

.field private is_showpage:Z

.field private ll_exchange_history_root:Landroid/widget/LinearLayout;

.field private loadmore_exchange:Landroid/widget/TextView;

.field private m:Lmyapp/MyApp;

.field private mHandler:Landroid/os/Handler;

.field private openHelper:Ldbclass/DBOpenHelper;

.field private page:I

.field private paged:I

.field private pagesize:Ljava/lang/String;

.field private scrollView:Landroid/widget/ScrollView;

.field private tv_exchange_state:Landroid/widget/TextView;

.field private tv_exchanged_day:Landroid/widget/TextView;

.field private tv_exchanged_gift_name:Landroid/widget/TextView;

.field private tv_pay_integral:Landroid/widget/TextView;

.field private view:Landroid/view/View;

.field private xlv_integral_history:Lcom/wmr/Lstview/XListView;


# direct methods
.method public constructor <init>()V
    .locals 3

    .prologue
    const/4 v2, 0x1

    const/4 v1, 0x0

    .line 46
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    .line 59
    iput v2, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->paged:I

    .line 61
    iput-boolean v1, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->is_showpage:Z

    .line 63
    const-string v0, "10"

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->pagesize:Ljava/lang/String;

    .line 77
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->getJsonString:Ljava/lang/String;

    .line 87
    new-instance v0, Landroid/os/Handler;

    invoke-direct {v0}, Landroid/os/Handler;-><init>()V

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->mHandler:Landroid/os/Handler;

    .line 89
    iput-boolean v1, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->is_loading:Z

    .line 90
    iput v2, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->page:I

    .line 46
    return-void
.end method

.method static synthetic access$0(Lcom/example/m6wmr/ExchangeHistoryActivity;)Ljava/util/List;
    .locals 1

    .prologue
    .line 83
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->beans:Ljava/util/List;

    return-object v0
.end method

.method static synthetic access$1(Lcom/example/m6wmr/ExchangeHistoryActivity;)Landroid/content/Context;
    .locals 1

    .prologue
    .line 54
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->context:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic access$10(Lcom/example/m6wmr/ExchangeHistoryActivity;)Lmyapp/MyApp;
    .locals 1

    .prologue
    .line 48
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->m:Lmyapp/MyApp;

    return-object v0
.end method

.method static synthetic access$11(Lcom/example/m6wmr/ExchangeHistoryActivity;)Ljava/lang/String;
    .locals 1

    .prologue
    .line 63
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->pagesize:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$12(Lcom/example/m6wmr/ExchangeHistoryActivity;Ljava/lang/String;)V
    .locals 0

    .prologue
    .line 77
    iput-object p1, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->getJsonString:Ljava/lang/String;

    return-void
.end method

.method static synthetic access$13(Lcom/example/m6wmr/ExchangeHistoryActivity;)I
    .locals 1

    .prologue
    .line 90
    iget v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->page:I

    return v0
.end method

.method static synthetic access$2(Lcom/example/m6wmr/ExchangeHistoryActivity;)Ljava/lang/String;
    .locals 1

    .prologue
    .line 77
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->getJsonString:Ljava/lang/String;

    return-object v0
.end method

.method static synthetic access$3(Lcom/example/m6wmr/ExchangeHistoryActivity;)Landroid/os/Handler;
    .locals 1

    .prologue
    .line 57
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->h:Landroid/os/Handler;

    return-object v0
.end method

.method static synthetic access$4(Lcom/example/m6wmr/ExchangeHistoryActivity;Lcom/example/m6wmr/ExchangeHistoryActivity$MyAdapter;)V
    .locals 0

    .prologue
    .line 86
    iput-object p1, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->adapter:Lcom/example/m6wmr/ExchangeHistoryActivity$MyAdapter;

    return-void
.end method

.method static synthetic access$5(Lcom/example/m6wmr/ExchangeHistoryActivity;)Lcom/wmr/Lstview/XListView;
    .locals 1

    .prologue
    .line 81
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->xlv_integral_history:Lcom/wmr/Lstview/XListView;

    return-object v0
.end method

.method static synthetic access$6(Lcom/example/m6wmr/ExchangeHistoryActivity;)Lcom/example/m6wmr/ExchangeHistoryActivity$MyAdapter;
    .locals 1

    .prologue
    .line 86
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->adapter:Lcom/example/m6wmr/ExchangeHistoryActivity$MyAdapter;

    return-object v0
.end method

.method static synthetic access$7(Lcom/example/m6wmr/ExchangeHistoryActivity;)V
    .locals 0

    .prologue
    .line 311
    invoke-direct {p0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->reflushData()V

    return-void
.end method

.method static synthetic access$8(Lcom/example/m6wmr/ExchangeHistoryActivity;)V
    .locals 0

    .prologue
    .line 253
    invoke-direct {p0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->onLoad()V

    return-void
.end method

.method static synthetic access$9(Lcom/example/m6wmr/ExchangeHistoryActivity;)V
    .locals 0

    .prologue
    .line 351
    invoke-direct {p0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->addData()V

    return-void
.end method

.method private addData()V
    .locals 1

    .prologue
    .line 354
    new-instance v0, Lcom/example/m6wmr/ExchangeHistoryActivity$5;

    invoke-direct {v0, p0}, Lcom/example/m6wmr/ExchangeHistoryActivity$5;-><init>(Lcom/example/m6wmr/ExchangeHistoryActivity;)V

    .line 386
    invoke-virtual {v0}, Lcom/example/m6wmr/ExchangeHistoryActivity$5;->start()V

    .line 389
    return-void
.end method

.method private initData()V
    .locals 2

    .prologue
    .line 396
    invoke-virtual {p0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Lmyapp/MyApp;

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->m:Lmyapp/MyApp;

    .line 397
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v0}, Lmyapp/MyApp;->getActivity()Ljava/util/ArrayList;

    move-result-object v0

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->activities:Ljava/util/ArrayList;

    .line 398
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->activities:Ljava/util/ArrayList;

    invoke-virtual {v0, p0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 399
    iput-object p0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->context:Landroid/content/Context;

    .line 401
    new-instance v0, Ldbclass/DBOpenHelper;

    iget-object v1, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->context:Landroid/content/Context;

    invoke-direct {v0, v1}, Ldbclass/DBOpenHelper;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->openHelper:Ldbclass/DBOpenHelper;

    .line 402
    new-instance v0, Landroid/content/ContentValues;

    invoke-direct {v0}, Landroid/content/ContentValues;-><init>()V

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->contentValues:Landroid/content/ContentValues;

    .line 403
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->openHelper:Ldbclass/DBOpenHelper;

    invoke-virtual {v0}, Ldbclass/DBOpenHelper;->getReadableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    .line 404
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->openHelper:Ldbclass/DBOpenHelper;

    invoke-virtual {v0}, Ldbclass/DBOpenHelper;->getWritableDatabase()Landroid/database/sqlite/SQLiteDatabase;

    move-result-object v0

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    .line 406
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->beans:Ljava/util/List;

    .line 407
    return-void
.end method

.method private initView()V
    .locals 2

    .prologue
    .line 99
    const v0, 0x7f0c0001

    invoke-virtual {p0, v0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->closebtn:Landroid/widget/LinearLayout;

    .line 100
    const v0, 0x7f0c0089

    invoke-virtual {p0, v0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->view:Landroid/view/View;

    .line 102
    const v0, 0x7f0c008a

    invoke-virtual {p0, v0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/wmr/Lstview/XListView;

    iput-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->xlv_integral_history:Lcom/wmr/Lstview/XListView;

    .line 103
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->xlv_integral_history:Lcom/wmr/Lstview/XListView;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Lcom/wmr/Lstview/XListView;->setPullLoadEnable(Z)V

    .line 104
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->xlv_integral_history:Lcom/wmr/Lstview/XListView;

    invoke-virtual {v0, p0}, Lcom/wmr/Lstview/XListView;->setXListViewListener(Lcom/wmr/Lstview/XListView$IXListViewListener;)V

    .line 107
    return-void
.end method

.method private onClickListener()V
    .locals 3

    .prologue
    .line 414
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->closebtn:Landroid/widget/LinearLayout;

    new-instance v1, Lcom/example/m6wmr/ExchangeHistoryActivity$mOnclistener;

    const/4 v2, 0x0

    invoke-direct {v1, p0, v2}, Lcom/example/m6wmr/ExchangeHistoryActivity$mOnclistener;-><init>(Lcom/example/m6wmr/ExchangeHistoryActivity;Lcom/example/m6wmr/ExchangeHistoryActivity$mOnclistener;)V

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 415
    return-void
.end method

.method private onLoad()V
    .locals 2

    .prologue
    .line 254
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->xlv_integral_history:Lcom/wmr/Lstview/XListView;

    invoke-virtual {v0}, Lcom/wmr/Lstview/XListView;->stopRefresh()V

    .line 255
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->xlv_integral_history:Lcom/wmr/Lstview/XListView;

    invoke-virtual {v0}, Lcom/wmr/Lstview/XListView;->stopLoadMore()V

    .line 256
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->xlv_integral_history:Lcom/wmr/Lstview/XListView;

    invoke-virtual {p0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->GetTime()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/wmr/Lstview/XListView;->setRefreshTime(Ljava/lang/String;)V

    .line 257
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->is_loading:Z

    .line 258
    return-void
.end method

.method private reflushData()V
    .locals 1

    .prologue
    .line 313
    new-instance v0, Lcom/example/m6wmr/ExchangeHistoryActivity$4;

    invoke-direct {v0, p0}, Lcom/example/m6wmr/ExchangeHistoryActivity$4;-><init>(Lcom/example/m6wmr/ExchangeHistoryActivity;)V

    .line 345
    invoke-virtual {v0}, Lcom/example/m6wmr/ExchangeHistoryActivity$4;->start()V

    .line 348
    return-void
.end method


# virtual methods
.method public GetTime()Ljava/lang/String;
    .locals 3
    .annotation build Landroid/annotation/SuppressLint;
        value = {
            "SimpleDateFormat"
        }
    .end annotation

    .prologue
    .line 285
    new-instance v1, Ljava/text/SimpleDateFormat;

    .line 286
    const-string v2, "yyyy-MM-dd    hh:mm:ss"

    .line 285
    invoke-direct {v1, v2}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

    .line 287
    .local v1, "sDateFormat":Ljava/text/SimpleDateFormat;
    new-instance v2, Ljava/util/Date;

    invoke-direct {v2}, Ljava/util/Date;-><init>()V

    invoke-virtual {v1, v2}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object v0

    .line 288
    .local v0, "date":Ljava/lang/String;
    return-object v0
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 4
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    const v3, 0x7f070026

    .line 112
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    .line 113
    const v1, 0x7f030016

    invoke-virtual {p0, v1}, Lcom/example/m6wmr/ExchangeHistoryActivity;->setContentView(I)V

    .line 115
    invoke-direct {p0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->initData()V

    .line 117
    invoke-direct {p0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->initView()V

    .line 119
    invoke-direct {p0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->addData()V

    .line 121
    invoke-direct {p0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->onClickListener()V

    .line 123
    invoke-virtual {p0}, Lcom/example/m6wmr/ExchangeHistoryActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    check-cast v1, Lmyapp/MyApp;

    iput-object v1, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->m:Lmyapp/MyApp;

    .line 124
    const/high16 v1, 0x7f0c0000

    invoke-virtual {p0, v1}, Lcom/example/m6wmr/ExchangeHistoryActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    .line 125
    .local v0, "top":Landroid/widget/LinearLayout;
    iget-object v1, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->m:Lmyapp/MyApp;

    invoke-virtual {v1}, Lmyapp/MyApp;->getAppcolor()Ljava/lang/String;

    move-result-object v1

    const-string v2, "1"

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_0

    .line 126
    invoke-virtual {v0, v3}, Landroid/widget/LinearLayout;->setBackgroundResource(I)V

    .line 127
    iget-object v1, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->view:Landroid/view/View;

    invoke-virtual {v1, v3}, Landroid/view/View;->setBackgroundResource(I)V

    .line 130
    :cond_0
    new-instance v1, Lcom/example/m6wmr/ExchangeHistoryActivity$1;

    invoke-direct {v1, p0}, Lcom/example/m6wmr/ExchangeHistoryActivity$1;-><init>(Lcom/example/m6wmr/ExchangeHistoryActivity;)V

    iput-object v1, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->h:Landroid/os/Handler;

    .line 246
    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .prologue
    .line 443
    invoke-super {p0}, Landroid/app/Activity;->onDestroy()V

    .line 444
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->db:Landroid/database/sqlite/SQLiteDatabase;

    invoke-virtual {v0}, Landroid/database/sqlite/SQLiteDatabase;->close()V

    .line 446
    return-void
.end method

.method public onLoadMore()V
    .locals 4

    .prologue
    .line 295
    iget-boolean v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->is_loading:Z

    if-nez v0, :cond_0

    .line 296
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->is_loading:Z

    .line 297
    iget v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->page:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->page:I

    .line 298
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->mHandler:Landroid/os/Handler;

    new-instance v1, Lcom/example/m6wmr/ExchangeHistoryActivity$3;

    invoke-direct {v1, p0}, Lcom/example/m6wmr/ExchangeHistoryActivity$3;-><init>(Lcom/example/m6wmr/ExchangeHistoryActivity;)V

    .line 304
    const-wide/16 v2, 0x1f4

    .line 298
    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 307
    :cond_0
    return-void
.end method

.method public onRefresh()V
    .locals 4

    .prologue
    const/4 v1, 0x1

    .line 264
    iget-boolean v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->is_loading:Z

    if-nez v0, :cond_0

    .line 265
    iput-boolean v1, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->is_loading:Z

    .line 266
    iput v1, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->page:I

    .line 269
    iget-object v0, p0, Lcom/example/m6wmr/ExchangeHistoryActivity;->mHandler:Landroid/os/Handler;

    new-instance v1, Lcom/example/m6wmr/ExchangeHistoryActivity$2;

    invoke-direct {v1, p0}, Lcom/example/m6wmr/ExchangeHistoryActivity$2;-><init>(Lcom/example/m6wmr/ExchangeHistoryActivity;)V

    .line 277
    const-wide/16 v2, 0x1f4

    .line 269
    invoke-virtual {v0, v1, v2, v3}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z

    .line 279
    :cond_0
    return-void
.end method

.method protected onStart()V
    .locals 0

    .prologue
    .line 436
    invoke-super {p0}, Landroid/app/Activity;->onStart()V

    .line 438
    return-void
.end method
